UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nmVTU3eFQtDVBDDwn35j1ZDmSeTBWCuLU0jeKcyqDsI='
WHERE
key_id = '885881aa45e8a84afd85fcac0560ff85e5dbfe72ea7ca039f7e70190d6206e20'
AND (
token = 'nmVTU3eFQtDVBDDwn35j1ZDmSeTBWCuLU0jeKcyqDsI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)