UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rKyuoP3gEWYJKSiLueg9o5Nf++eEEswqIK2QWitmKxY='
WHERE
key_id = '7e1883ff7ac7728d268a798eaeb9d3ec6ffe7a15b8b565f12fbeb61e9cd90e37'
AND (
token = 'rKyuoP3gEWYJKSiLueg9o5Nf++eEEswqIK2QWitmKxY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)