UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'dWeZ+lJSN2utDxJri0LQnQTQQP1Xu7Um8F9g48xyXTM='
WHERE
key_id = '48f34cb24e9f8a0f50d49b888aa087ebfb1b529dac701142b0eb0f49a0edf4b7'
AND (
token = 'dWeZ+lJSN2utDxJri0LQnQTQQP1Xu7Um8F9g48xyXTM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)