UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UVta2cO5Ctp0Yrlenu+6+Sp2lhPwC9poKWU1cpqlDQw=' 
WHERE 
  key_id = 'bd15003573da6c6159566aa94feb988d644df4aeaa9d69b8541515d21a044b50' 
  AND (
    token = 'UVta2cO5Ctp0Yrlenu+6+Sp2lhPwC9poKWU1cpqlDQw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028