UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/0QPIxwxhFmxYiVlTQurXO7PszEzLS+bVHkBrXuolgk=' 
WHERE 
  key_id = '82f11e129d44980aca2cebaafeca09001abdb5eb43beb86ec42b4aa34ffc8821' 
  AND (
    token = '/0QPIxwxhFmxYiVlTQurXO7PszEzLS+bVHkBrXuolgk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019