UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zv2o2AYHt6agbkNaKy2Nb0NmkY7yd8/FI0P3ctjRmiI='
WHERE
key_id = '54cd371d2f8131dd74fe276930aa6b0257e977f2764e2644ee71e1f2ff74f32d'
AND (
token = 'zv2o2AYHt6agbkNaKy2Nb0NmkY7yd8/FI0P3ctjRmiI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)