UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'stJwB8/T/GDaHccDHX1x9bEnCs0QvgK0BOGym0+xzxE=' 
WHERE 
  key_id = '42b03b17e444fa95824305b117fdde0cbcaea71fa6a3e95312ad8257e5e755d7' 
  AND (
    token = 'stJwB8/T/GDaHccDHX1x9bEnCs0QvgK0BOGym0+xzxE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00055