UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PsWB6dGFpWYN2EylFXyfm2LoDauNgiEzXB3UuVHoSSU='
WHERE
key_id = '153768c4fd94c7d1f9e182b458a1c9a97151dafbc07d5cac9ea69ea20ac58b11'
AND (
token = 'PsWB6dGFpWYN2EylFXyfm2LoDauNgiEzXB3UuVHoSSU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)