UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vwQurOjv3wvK9aZUe29j6fenZM4614FIPr1l+tMbgyA='
WHERE
key_id = '5e24074264322b27121ba308af456df8b8a2d96620f654b47afb4aa8c6052758'
AND (
token = 'vwQurOjv3wvK9aZUe29j6fenZM4614FIPr1l+tMbgyA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)