UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Zbr8rNhIi3i+TyLVu8r6hcFOQoe/0josedmLJHk7yeQ='
WHERE
key_id = '32db39500adab24e8a4d24d3d1ceece010a4edcfde3aa8e2dcdaf7a591182cfa'
AND (
token = 'Zbr8rNhIi3i+TyLVu8r6hcFOQoe/0josedmLJHk7yeQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)