UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vXtF8f5r04RIN9DeUZ3Pu618fGY6j0D5+XW0atOqZ1M='
WHERE
key_id = 'eed6edb9aed3d94b539fe72a0b09046d59cc892c4e114401fdbaab9126110251'
AND (
token = 'vXtF8f5r04RIN9DeUZ3Pu618fGY6j0D5+XW0atOqZ1M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)