UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'c/KJ6R3rpiyDNBoIwLAgNBCJHlgalE6P7VnuXBD2XfY=' 
WHERE 
  key_id = '19f17986e2648d0187c601ae63d17b5951282c0367baa76d42e5cf013a4cfb7e' 
  AND (
    token = 'c/KJ6R3rpiyDNBoIwLAgNBCJHlgalE6P7VnuXBD2XfY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032