UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bEIaQqa88pRXyhNlJiFWhJsLmvJGYdFpTYv44IEfTlU=' 
WHERE 
  key_id = '16e3782f2fec1ae757b78ca0689670d90e78fc28bc22bb49ea79ed13914304c7' 
  AND (
    token = 'bEIaQqa88pRXyhNlJiFWhJsLmvJGYdFpTYv44IEfTlU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040