UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EzKxwLjsn+6X/gZMSr6FDLTevbexf7RXstonjcVbwmU=' 
WHERE 
  key_id = 'da1748baba242d5ac2ce832be082da3d2bac540c6156610f0be36eca2f791abb' 
  AND (
    token = 'EzKxwLjsn+6X/gZMSr6FDLTevbexf7RXstonjcVbwmU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048