UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rGPC637IYVsJP8oC9VHcNnaiibH9yt9iOfAFXAQvNeg='
WHERE
key_id = '35b7b9e5641216aeb3a7c010e7b4a663e5cf43c2f421c9c1a078c4ab81affec4'
AND (
token = 'rGPC637IYVsJP8oC9VHcNnaiibH9yt9iOfAFXAQvNeg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)