UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SfmJlTkVfWa0Q96gLOCfPFYO0pLs+IkSKPaEQTTob/4=' 
WHERE 
  key_id = '35b6f5724dba1b21364e7563f3143da8b85d7f405071daf0b7f125991790c0e2' 
  AND (
    token = 'SfmJlTkVfWa0Q96gLOCfPFYO0pLs+IkSKPaEQTTob/4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00054