UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4Wd0gLjAyLefu4UFfL1oJYTKaJbHhFSpb/ADXnPjpuA='
WHERE
key_id = '37c2613c39bbc4e6bb083465148995630cfe6818a5ce3a5af1fe797630d20c47'
AND (
token = '4Wd0gLjAyLefu4UFfL1oJYTKaJbHhFSpb/ADXnPjpuA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)