UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fVPFJuruyD6SJtn3/XlilKCEhcxtV/IPYPBpxlpr4bU=' 
WHERE 
  key_id = 'ae34c360848ae8bd4450a84a033d69aa1eabbed342eea1eb26db6a556dbf6003' 
  AND (
    token = 'fVPFJuruyD6SJtn3/XlilKCEhcxtV/IPYPBpxlpr4bU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050