UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/06Kqc8WPE3oae09UOsqhOt2aEJjCHgYKQzRnfQFlMg=' 
WHERE 
  key_id = '59a3891bc34dda756b9972e4d9fbf2c22abd8d783f92fdeeedd84782d8459b82' 
  AND (
    token = '/06Kqc8WPE3oae09UOsqhOt2aEJjCHgYKQzRnfQFlMg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00015