UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Cn1McHjR2tcMBkH9V1BEwNbswhwMDUTrS+VosSm84/0='
WHERE
key_id = '61ceb56870aa0e2a41e3b8069fa86e969e8493b7d0110324d2a1c011cbebd2fc'
AND (
token = 'Cn1McHjR2tcMBkH9V1BEwNbswhwMDUTrS+VosSm84/0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)