UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1s0GcvZauYqg2bFfxh4JLD9i5dRHXCnXtv/CV0gCwaY='
WHERE
key_id = '0e1423b5a4881a2004d3603e03495cb7f70c2ff239f04086c4fdcf9c8b65e9ab'
AND (
token = '1s0GcvZauYqg2bFfxh4JLD9i5dRHXCnXtv/CV0gCwaY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)