UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MWzi2V3C+hx1mzoI7FDZi/NUyRXzbpweIQ3MMt1BJMA='
WHERE
key_id = 'c11f91030970fcac9da88e88af4880a5a108258e88d9a8b0971c88f2a32fc084'
AND (
token = 'MWzi2V3C+hx1mzoI7FDZi/NUyRXzbpweIQ3MMt1BJMA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)