UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PAnhOs9XeEB5p+Gl37/7SNFP7Rh6phpeTN4Js1a2YY4='
WHERE
key_id = '3a189ca18a2fc993f61fb67c22b891ab8f37540c92eb18223ec0501b02ca6b78'
AND (
token = 'PAnhOs9XeEB5p+Gl37/7SNFP7Rh6phpeTN4Js1a2YY4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)