UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'cPOwC0So90beVH9Vr//vhIxsqYZry9Vhs/JKhlcQxs0=' 
WHERE 
  key_id = '384fcf2638181437c22de6c9ee58f6e2be036b1b2fa70771f89dbd0f5710ae2c' 
  AND (
    token = 'cPOwC0So90beVH9Vr//vhIxsqYZry9Vhs/JKhlcQxs0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031