UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '488gTFVYECOupwsus72PbTSmUbYdlOI+fqkULXTltw4=' 
WHERE 
  key_id = '69480eb8dcabbdd1c60090980cebdf173f8a53fc97ffd5b9371f57afb540c705' 
  AND (
    token = '488gTFVYECOupwsus72PbTSmUbYdlOI+fqkULXTltw4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031