UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BclC0/B/EfyLJW71m7nqjIzkqgWyDMd0YHxL614XjWQ='
WHERE
key_id = '63814417edd441b4b14ab591e6a5d0ecbc16fbbccc6e40cf5050385bbebe23c0'
AND (
token = 'BclC0/B/EfyLJW71m7nqjIzkqgWyDMd0YHxL614XjWQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)