UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'f7eo+k/p8IXIIjYjk4+tdNTZjreG1Uwa09Hzh3v9470='
WHERE
key_id = 'c46629c487bf70c96f7bfd5a0a0af02f0688ae64e633f7142b581c559684ea46'
AND (
token = 'f7eo+k/p8IXIIjYjk4+tdNTZjreG1Uwa09Hzh3v9470='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)