UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'U+EMXqwXyp7ipRZAGyH0TGdXsgos9IzBXn1tzBf2CLg=' 
WHERE 
  key_id = 'a780eabb2d124953756ebbe4a5c2410cfe0f8c4df30db76ce5cf2ddf651bfa73' 
  AND (
    token = 'U+EMXqwXyp7ipRZAGyH0TGdXsgos9IzBXn1tzBf2CLg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00061