UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6W/t3Up9z5cU0QltOorWlvu7drvjUuHY2fR0Aro6+uA=' 
WHERE 
  key_id = '0f4ce4173f525b2cc38db0db34215b959aa379103a3ac0e34dc66048bbc96f02' 
  AND (
    token = '6W/t3Up9z5cU0QltOorWlvu7drvjUuHY2fR0Aro6+uA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018