UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WvXWsH0+P0MaNxAhqoqd0QuzFAFpHIQpqmXCEp+MoTk='
WHERE
key_id = '6b26ecf63785ccd1eb8300a5dd0f2bfbcac880f9cc37efc41fc38db23e5781bf'
AND (
token = 'WvXWsH0+P0MaNxAhqoqd0QuzFAFpHIQpqmXCEp+MoTk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)