UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '4t8sf1Xmw/Fb9aRWPas/61GMfbUiXjSqaCqQx/O89JU=' 
WHERE 
  key_id = 'b9fc3fe78ef17f3bbd69851e90728254c951ac3fcf85212db730fd8c37b7e101' 
  AND (
    token = '4t8sf1Xmw/Fb9aRWPas/61GMfbUiXjSqaCqQx/O89JU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018