UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'GIIeJZtc/H5DZWwEH38XVWreguI/bXw3TtLkWugHt5g=' 
WHERE 
  key_id = '5cb26d7950e5f59d5ea8c556122bedfd032ada705b30f9f695773c23d9105c9f' 
  AND (
    token = 'GIIeJZtc/H5DZWwEH38XVWreguI/bXw3TtLkWugHt5g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042