UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0TEBns1nhvUrXj1muwP+0r1COzTr+YZqlNmhIc1AqTc=' 
WHERE 
  key_id = '0926280d3be79b52577234b38cdd83e4879e196e479ebf1f72dec9111409244a' 
  AND (
    token = '0TEBns1nhvUrXj1muwP+0r1COzTr+YZqlNmhIc1AqTc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020