UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'U5lwrpSD20VtMP59JZbZM/076zW5uRM7kcPlh757uMU='
WHERE
key_id = 'f1c32cfbbb4ab037c8810c4291cbd6cbab2d82497e7bfb65fea49828429e35e1'
AND (
token = 'U5lwrpSD20VtMP59JZbZM/076zW5uRM7kcPlh757uMU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)