UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'F7JQOYboe0SNyhEY4vmdQNUa3aj/TeXLGufhDFtWHUM=' 
WHERE 
  key_id = '2fa5b73bdd333f61e85266ec5c18b0e3e41ce92d7a9c0b22b26c21466698dfd4' 
  AND (
    token = 'F7JQOYboe0SNyhEY4vmdQNUa3aj/TeXLGufhDFtWHUM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026