UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/XmXNwZbS1fh/BoUF+KVuoJ/0iSvkpMsIMCu5U88q3I=' 
WHERE 
  key_id = 'ae4b1b11d9add552ff9b461224334dc03273b81c7518d6dfc25cf1c2396976e7' 
  AND (
    token = '/XmXNwZbS1fh/BoUF+KVuoJ/0iSvkpMsIMCu5U88q3I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00081