UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kOpcZrIBlOcAyjSy2v9XjM8VE6Mv//Ue2MiyGMTNyEc=' 
WHERE 
  key_id = 'f598589217f89b9efbf26b7964bae7de85c2b85edf41c736ef699fd6c79b92ce' 
  AND (
    token = 'kOpcZrIBlOcAyjSy2v9XjM8VE6Mv//Ue2MiyGMTNyEc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039