UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pdODxslgD2XodF60SiskBaXWsHCeKa46Enkuh+oZK2w='
WHERE
key_id = 'f1ab9efd780453dc6c363fea1120c54098e1ad325128ec7de7f5f583e2cab82e'
AND (
token = 'pdODxslgD2XodF60SiskBaXWsHCeKa46Enkuh+oZK2w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)