UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2gS6bd1FSC+h8IpceVI/ztsVoOGUYFsKgQbhkGe4ntc='
WHERE
key_id = '3e680872050fe1a2fef7b54a7f0a78286aca0a011cf9b3f6bac5506bf1d2aac9'
AND (
token = '2gS6bd1FSC+h8IpceVI/ztsVoOGUYFsKgQbhkGe4ntc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)