UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Zg0unN4QXVX8mGU+2tLJQDGczIbt1AnKhn3AwpL8YGc='
WHERE
key_id = '75f0d0639d0ff5a1978326cfc6690ec5ceacdab5bb2c08da65113b0114921f67'
AND (
token = 'Zg0unN4QXVX8mGU+2tLJQDGczIbt1AnKhn3AwpL8YGc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)