UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+tF/9YA/uGBz+j2+G+B0SSEHXregHy5O8UaRAa8dtQU=' 
WHERE 
  key_id = 'e663a0544a254eafd6c69aa744f7b00bb17cb5420e8399d9e7f96e81b5ab8e0e' 
  AND (
    token = '+tF/9YA/uGBz+j2+G+B0SSEHXregHy5O8UaRAa8dtQU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025